import request from '@/libs/axios'

export const project = params => {
  return request({
    url: '/projects',
    method: 'get',
    params: params
  })
}

export const addProject = params => {
  return request({
    url: '/projects',
    method: 'post',
    data: params
  })
}

export const showProject = params => {
  return request({
    url: '/projects/' + params.id,
    method: 'get',
    params: params
  })
}

export const editProject = params => {
  return request({
    url: '/projects/' + params.id,
    method: 'put',
    data: params
  })
}

export const deleteProject = params => {
  return request({
    url: '/projects/' + params.id,
    method: 'delete',
    data: params
  })
}

export const copyProject = params => {
  return request({
    url: '/projects/copy/' + params.id,
    method: 'post',
    data: params
  })
}

export const detectionProject = params => {
  return request({
    url: '/projects/detection/' + params.id,
    method: 'post',
    data: params
  })
}

export const classificationProject = params => {
  return request({
    url: '/projects/classification',
    method: 'get',
    params: params
  })
}

export const allProject = params => {
  return request({
    url: '/projects/all',
    method: 'get',
    params: params
  })
}

export const checkMd5 = params => {
  return request({
    url: '/projects/md5',
    method: 'post',
    data: params
  })
}

export const slbPort = params => {
  return request({
    url: '/projects/slbPort',
    method: 'post',
    data: params
  })
}
